package com.example.rabbitmq.demo3_backup_exchange;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author songyahui
 * @Date 2023/7/12 21:42
 * @Description
 */
@Component
@Slf4j
public class WarningConsumer {

    @RabbitListener(queues = BackupConfig.WARNING_QUEUE_NAME)
    public void receiveConfirmMessage(Message message){
        log.warn("告警处理！不可达消息：{}", new String(message.getBody()));
    }
}
